package cn.jsu.projectmanage.dao.projectManage;

import cn.jsu.projectmanage.pojo.dto.Group;
import cn.jsu.projectmanage.pojo.dto.GroupUser;
import cn.jsu.projectmanage.pojo.dto.Project;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface GroupDao {
    Integer insertGroup(Group group);

    Integer insertProject(Project project);

    Integer insertGroupUsers(@Param("groupUsers") List<GroupUser> groupUsers);

    void deleteGroupUsers(Integer groupId, List<Integer> userIds);

    Project queryProjectById(Integer projectId);

    List<Project> queryProjectAll();

    Group queryGroupById(Integer groupId);

    void updateGroupName(Integer groupId,String groupName);

    List<Group> queryGroupByGroup(Integer groupId);

}
